﻿using UnityEngine;
using System.Collections;
using CHFramework;
using UnityEngine.UI;

public class UILoginPanel : BaseUI 
{
    public Button LoginBtn;

    private void Awake()
    {
        base.CurrentUIType.PanelType = UIPanelType.Normal;
        base.CurrentUIType.ShowMode = UIPanelShowMode.Normal;

        EventTriggerListener.Get(LoginBtn.gameObject).onClick = OnShowCreatePanel;
    }

    public void OnShowCreatePanel(GameObject sender)
    {
        UIManager.Instance.LoadSceneSync("GameLobby", null, null, () =>
        {
            UIManager.Instance.ShowUIPanel(EnumPanel.UIMainPanel);
            UIManager.Instance.ShowUIPanel(EnumPanel.UITopMainPanel);
        });
    }
}
